package com.hb.trade.server.project.util;

import cn.hutool.core.convert.Convert;
import cn.hutool.core.convert.NumberChineseFormatter;
import cn.hutool.core.util.StrUtil;

/**
* Description: 金额小写转大写
* @author: fengbin
* @date: 2022/2/23 12:50
*/
public class DigitToChineseUtil {
    //**金额大小写转换
    public static String digitToChinese(String digit){
        if(StrUtil.isEmpty(digit)){
            return "金额为空";
        }
        Double aDouble = Double.valueOf(digit);
        String format = Convert.numberToChinese(aDouble, true);
        return format;
    }
}
